package com.yxplearn.mybatisplus.collision;

import java.awt.*;

public class Circle extends Panel {

    private Point point;// 圆心
    private int radius;// 半径

    public Circle(Point point, int radius) {
        this.point = point;
        this.radius = radius;
    }

    public void paint(Graphics g) {
        g.setColor(Color.red);
        g.fillOval(point.x, point.y, radius, radius);
    }

    public Point getPoint() {
        return point;
    }

    public int getRadius() {
        return radius;
    }
}
